{load href="__plugin__/ueditor/ueditor.config.js,__plugin__/ueditor/ueditor.all.min.js" /}
<style>
    .layui-table tr th{text-align:center;}
    .layui-table tr td{padding: 0;text-align:center;background-color:#fff;}
    .layui-table tr td .layui-input-inline{border:none;width:70%;margin:0;}
    .layui-form-item .layui-inline{margin:0;}
    .layui-form-item .layui-inline input{border:none;}
    .layui-form-item {margin-bottom:0;}
    .layui-table tr td:hover{background-color:#fff;}
    .layui-table tr td .layui-form-mid{display:block;width:30%;text-align:center;margin:0;padding:0;color:#6590dc;}
</style>
<form class="layui-form layui-form-pane edit-form">
    <div class="layui-tab">
      <ul class="layui-tab-title">
        <li class="layui-this">基础配置</li>
        <li>会员权限</li>
        <li>关于我们</li>
      </ul>
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <div class="layui-form-item">
                <label class="layui-form-label" style="width:170px">有偿服务最低发布金</label>
                <div class="layui-input-inline" >
                     <input type="number" name="need_min_price" required lay-verify="required" placeholder="请输入有偿服务最低发布金" autocomplete="off" class="layui-input" value="{$data['need_min_price']}">
                </div>
                <div class="layui-form-mid layui-word-aux">元</div>
            </div> 
        </div>
        <!-- 基础配置 -->
        <div class="layui-tab-item">
            
            <table class="layui-table" >
                <thead>
                    <tr>
                        <th width="20%">角色</th>
                        <th width="25%">有偿服务佣金</th>
                        <th width="25%">折扣券发布次数</th>
                        <th width="30%">折扣券最大发布张数</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>会员</td>
                        <td>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline" >
                                        <input name="h_yongjin" type="number" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data['h_yongjin']}">
                                    </div>
                                    <div class="layui-form-mid">(元)</div>
                                </div>
                            </div>
                        </td>
                        <td>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline" >
                                         <input name="h_zhekou_fabu" type="number" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data['h_zhekou_fabu']}">
                                    </div>
                                    <div class="layui-form-mid">(次/月)</div>
                                </div>
                            </div>
                           
                        </td>
                        <td>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline" >
                                        <input name="h_zhekou_shuliang" type="number" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data['h_zhekou_shuliang']}">
                                    </div>
                                    <div class="layui-form-mid">(张)</div>
                                </div>
                            </div>
                           
                        </td>
                    </tr>
                     <tr>
                        <td >普通用户</td>
                        <td>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline" >
                                        <input name="p_yongjin" type="number" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data['p_yongjin']}">
                                    </div>
                                    <div class="layui-form-mid">(元)</div>
                                </div>
                            </div>
                            
                        </td>
                        <td>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline" >
                                        <input name="p_zhekou_fabu" type="number" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data['p_zhekou_fabu']}">
                                    </div>
                                    <div class="layui-form-mid">(次/年)</div>
                                </div>
                            </div>
                            
                        </td>
                        <td>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <div class="layui-input-inline" >
                                        <input name="p_zhekou_shuliang" type="number" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$data['p_zhekou_shuliang']}">
                                    </div>
                                    <div class="layui-form-mid">(张)</div>
                                </div>
                            </div>
                            
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">会员权益</label>
                <div class="layui-input-block">
                    <textarea name="h_quanyi" placeholder="请输入会员权益" class="layui-textarea">
                        {$data['h_quanyi']}
                    </textarea>
                </div>
            </div>
        </div>
        <!-- 会员权限 end-->
        <div class="layui-tab-item">
            <textarea id="container" name="about"  type="text/plain"  >{$data['about']}</textarea>
        </div>
        <!-- 关于我们 end-->
        
      </div>
    </div>
    
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-filter="editform1" lay-submit="">
                保存
            </button>
            <button class="layui-btn layui-btn-primary layui-btn-cancel" type="button">
                取消
            </button>
        </div>
    </div>
</form>
<script>
    layform.on('submit(editform1)', function(data) {
        _ajax({
            data: data.field,
            success: function(res) {
                if (res.code) {
                    layer.msg(res.msg, {
                        icon: 2
                    });
                } else {
                    layer.msg(res.msg, {
                        icon: 1
                    });
                  
                   
                }
            },
            error: function() {
                layer.msg('系统繁忙,请稍后重试', {
                    icon: 0
                });
            }
        });
        return false;
    });
    var ue = UE.getEditor('container', {
        autoHeight: false,
        initialFrameHeight: 300,
        elementPathEnabled:false,
        autoHeightEnabled:true,
        toolbarTopOffset :0,
        wordCount:false,
        zIndex :1
    });
   
</script>
